package titiritero.vista;

import java.awt.event.*;
import titiritero.ControladorJuego;

public class KeyController extends KeyAdapter {

	private ControladorJuego controlador; 

	public KeyController(ControladorJuego unControlador) {
		this.controlador = unControlador;
	}
	      
	public void keyPressed(KeyEvent e) {
		
		this.controlador.despacharKey(e.getKeyCode());
		
		//System.out.println("Se presiona la tecla: "+e.getKeyCode());
	}
	
	/*public void keyReleased (KeyEvent e) {
		keyCode = e.getKeyCode();
		
		System.out.println("Se suelta la tecla: "+keyCode);
	}*/
}